-- GENERATED SPELL FOR [Stratholme Citizen] --


function spell0_28340(pUnit, Event) --@Accelerate,Self--
pUnit:FullCastSpellOnTarget(52635,pUnit)
pUnit:RegisterEvent('Sorts_28340', 30260, 1)
end

function spell1_28340(pUnit, Event) --@Accelerate,Self--
pUnit:FullCastSpellOnTarget(58820,pUnit)
pUnit:RegisterEvent('Sorts_28340', 30336, 1)
end

function spell2_28340(pUnit, Event) --@Time Shift,Self--
pUnit:FullCastSpellOnTarget(52636,pUnit)
pUnit:RegisterEvent('Sorts_28340', 262, 1)
end

function spell3_28340(pUnit, Event) --@Void Shield,Self--
pUnit:FullCastSpellOnTarget(52634,pUnit)
pUnit:RegisterEvent('Sorts_28340', 8328, 1)
end

function spell4_28340(pUnit, Event) --@Void Shield,Self--
pUnit:FullCastSpellOnTarget(58813,pUnit)
pUnit:RegisterEvent('Sorts_28340', 8297, 1)
end

function spell5_28340(pUnit, Event) --@Void Strike,n/a--
pUnit:FullCastSpellOnTarget(52633,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28340', 669, 1)
end

function Sorts_28340(pUnit, Event)
local choix_sorts_28340 = math.random(0, 5)
if choix_sorts_28340 == 0 then
pUnit:RegisterEvent('spell0_28340', 1, 1)
end
if choix_sorts_28340 == 1 then
pUnit:RegisterEvent('spell1_28340', 1, 1)
end
if choix_sorts_28340 == 2 then
pUnit:RegisterEvent('spell2_28340', 1, 1)
end
if choix_sorts_28340 == 3 then
pUnit:RegisterEvent('spell3_28340', 1, 1)
end
if choix_sorts_28340 == 4 then
pUnit:RegisterEvent('spell4_28340', 1, 1)
end
if choix_sorts_28340 == 5 then
pUnit:RegisterEvent('spell5_28340', 1, 1)
end
end

function mob28340_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28340', math.random(1500, 3000), 1)
end

function mob28340_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28340_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28340_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28340, 1, 'mob28340_Action')
RegisterUnitEvent(28340, 2, 'mob28340_Leave')
RegisterUnitEvent(28340, 3, 'mob28340_Kill')
RegisterUnitEvent(28340, 4, 'mob28340_Die')
